package com.anlogic.sdk.linker.ui;

import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;

import com.anlogic.sdk.linker.MemRangeSection;

public class MemRangeSectionLabelProvider extends LabelProvider implements ITableLabelProvider {
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	public String getColumnText(Object element, int columnIndex) {
		if (!(element instanceof MemRangeSection))
			return null;
		MemRangeSection m = (MemRangeSection) element;
		switch (columnIndex) {
		case 0:
			return m.getSectionName();
		case 1:
			return m.getMemoryRange();
		}
		return "unknown field, idx " + columnIndex;
	}
}